#include "convex_hull.h"
#include <sstream>

void find_diameter(const std::vector<Point> &points, const std::vector<int> &enabled, int &a, int &b)
{
	a = 0, b = 0;

	int i1 = 0, i2 = 1;
	for (; i1 < enabled.size(); i1++)
	{
		Line l = Line(points[enabled[i1]], points[enabled[(i1 + 1) % enabled.size()]]);
		while (closer(l, points[enabled[i2]], points[enabled[(i2 + 1) % enabled.size()]]) > 0)
		{
			i2 = (i2 + 1) % enabled.size();
		}

		if (longer(points[enabled[i1]], points[enabled[i2]], points[a], points[b]) > 0)
		{
			a = enabled[i1];
			b = enabled[i2];
		}

		if (longer(points[enabled[(i1 + 1) % enabled.size()]], points[enabled[i2]], points[a], points[b]) > 0)
		{
			a = enabled[(i1 + 1) % enabled.size()];
			b = enabled[i2];
		}
	}	
}

int main()
{
	int n;
	std::cin >> n;

	std::vector<Point> points;
	std::vector<int> hull;
	for (int i = 0; i < n; i++)
	{
		double x, y;
		std::cin >> x >> y;
		points.push_back(Point(x, y));
	}

	quick_hull(points, hull);

	int a, b;
	find_diameter(points, hull, a, b);
	
	std::cout << std::fixed;
	std::cout.precision(40);
	std::cout << points[a] << "\n" << points[b];
	std::cout.flush();
}